% print figures with characteristic robustness

figure(1)
set(gcf,'Position',[1 1 750 1500])
subplot(3,1,1)
load tables_outputs/PerformanceSignificant.mat
sig = floor(1000*XX.alpha(:,2)) >= floor(1000*XX.bh);
plot(XX.ret(~sig,1),XX.alpha(~sig,1),'*')
hold on
plot(XX.ret(sig,1),XX.alpha(sig,1),'r*')
set(gca,'ylim',[-1 2.5])
set(gca,'xlim',[0 2.5])
xlabel('Raw return')
ylabel('IPCA alpha')
hline = refline(0,0);
hline.LineStyle = ':';
vline = refline(1,0);
vline.LineStyle = ':';
title('Panel A: Strategies based on insignificant characteristics')

subplot(3,1,2)
load tables_outputs/PerformanceTop23.mat
sig = floor(1000*XX.alpha(:,2)) >= floor(1000*XX.bh);
plot(XX.ret(~sig,1),XX.alpha(~sig,1),'*')
hold on
plot(XX.ret(sig,1),XX.alpha(sig,1),'r*')
set(gca,'ylim',[-1 2.5])
set(gca,'xlim',[0 2.5])
xlabel('Raw return')
ylabel('IPCA alpha')
hline = refline(0,0);
hline.LineStyle = ':';
vline = refline(1,0);
vline.LineStyle = ':';
title('Panel B: Strategies based on bottom 23 characteristics')
% title('Top 23')

subplot(3,1,3)
load tables_outputs/PerformanceRestricted.mat
sig = floor(1000*XX.alpha(:,2)) >= floor(1000*XX.bh);
plot(XX.ret(~sig,1),XX.alpha(~sig,1),'*')
hold on
plot(XX.ret(sig,1),XX.alpha(sig,1),'r*')
set(gca,'ylim',[-1 2.5])
set(gca,'xlim',[0 2.5])
xlabel('Raw return')
ylabel('IPCA alpha')
hline = refline(0,0);
hline.LineStyle = ':';
vline = refline(1,0);
vline.LineStyle = ':';
title('Panel C: Zhang, Hang, Cao, and Tong (2022) 10 strategies')

saveas(gcf,'figures_outputs/Figure3.eps','epsc')
saveas(gcf,'figures_outputs/Figure3.jpg','jpg')